import request from "@/utils/request";

//获取区域
export function getArea_api() {
  return request.get({
    url: "/api/mp/getArea",
  });
}

//获取区域下的评分列表

export function getScoreList_api(area_id) {
  return request.get({
    url: "/api/mp/getScoreList",
    data: {
      area_id,
    },
  });
}

//获取评分项目

export function getScoreItems_api(data) {
  return request.get({
    url: "/api/mp/getScoreItems",
    data,
  });
}
//获取评分项目

export function calScoreItem_api(data) {
  return request.post({
    url: "/api/mp/calScoreItem",
    data,
  });
}
//保存成绩
export function saveScore_api(data) {
  return request.post(
    {
      url: "/api/user/saveScore",
      data,
    },
    {
      isTransformResponse: false,
    }
  );
}
//计算总评级
export function calScoreTotal_api(data) {
  return request.post({
    url: "/api/mp/calScoreTotal",
    data,
  });
}

//获取我的评分列表

export function scoreList_api(data) {
  return request.get({
    url: "/api/user/scoreList",
    data,
  });
}

//评分删除

export function delScore_api(id) {
  return request.get({
    url: "/api/user/delScore",
    data: {
      id,
    },
  });
}
//获取评分详情

export function getScoreDetail_api(id) {
  return request.get({
    url: "/api/user/getScoreDetail",
    data: {
      id,
    },
  });
}

//获取评分详情

export function questionOnce_api(id) {
  return request.get({
    url: "/api/user/questionOnce",
    data: {
      id,
    },
  });
}

//检查批量权限

export function checkBatch_api(id) {
  return request.get(
    {
      url: "/api/user/checkBatch",
    },
    {
      isTransformResponse: false,
    }
  );
}

//下载模版

export function downloadTemplate_api(data) {
  return request.get({
    url: "/api/user/downloadTemplate",
    data,
  });
}

//计算总评级
export function uploadTemplate_api(data) {
  return request.uploadFile({
    url: "/api/user/uploadTemplate",
    ...data,
  });
}

//任务列表

export function getBatchList_api(id) {
  return request.get({
    url: "/api/user/getBatchList",
  });
}

//删除批量

export function delBatch_api(id) {
  return request.get({
    url: "/api/user/delBatch",
    data: {
      id,
    },
  });
}


export function getUploadPath_api(data) {
  return request.post({
    url: "/api/user/getUploadPath",
    data
  });
}
